﻿using EventHandlerDemo.Domain.Orders.Events;
using MediatR;

namespace EventHandlerDemo.Application.Orders.EventHandlers;

public class OrderCreatedEventHandler : INotificationHandler<OrderCreatedEvent>
{
    public Task Handle(OrderCreatedEvent notification, CancellationToken cancellationToken)
    {
        Console.WriteLine($"EventHandle-{notification.order.Id}-{notification.order.Name}");
        return Task.CompletedTask;
    }
}
